﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Stauffware.Common.Core;

namespace Stauffware.Common.Console
{
	/// <summary>
	/// Indicates a syntax error in a command line.
	/// </summary>

	public class CmdLineSyntaxError : System.Exception
	{
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="descr">a description of what went wrong</param>
		public CmdLineSyntaxError (string descr)
			: base(descr)
		{
			ErrorCausedBy.User(this);
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="descr">a description of what went wrong</param>
		/// <param name="inner">the inner exception</param>
		public CmdLineSyntaxError (string descr, Exception inner)
			: base(descr, inner)
		{
			ErrorCausedBy.User(this);
		}


#if !SILVERLIGHT
		/// required for serialization
		protected CmdLineSyntaxError (System.Runtime.Serialization.SerializationInfo info,
							System.Runtime.Serialization.StreamingContext context)
			: base(info, context) { }
#endif
	}
}
